﻿<%@ Page Title="Refund Rule Items" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RefundRuleItems.aspx.cs" Inherits="IFD2.RefundRuleItems" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>

    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label1" runat="server" meta:resourcekey="RefundRule" Text="Refund Rule: "></asp:Label><br />
                <asp:Label ID="lblRuleCode" runat="server" Font-Bold="True"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <asp:Button ID="btnLog" runat="server" Text="Log..." CssClass="form-control input-sm btn-primary text-center" Width="100%" onclick="btnLog_Click"  meta:resourcekey="Log" />
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="grdRuleDetails" runat="server" AutoGenerateColumns="False" style="min-width:700px;width:100%;" class="table-hover"
                            CellPadding="4" DataKeyNames="airline,rule_code,hours_from_fly" 
                            DataSourceID="sqlRuleDetails" ForeColor="#333333" GridLines="None">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <input name="KEY" type="radio" value='<%# Eval("responsibility")+"|"+Eval("hours_from_fly") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="responsibility" HeaderText="responsibility" HeaderStyle-ForeColor="Yellow" meta:resourcekey="responsibility1" ReadOnly="True" SortExpression="responsibility" />
                                <asp:BoundField DataField="hours_from_fly" HeaderText="hours_from_fly" meta:resourcekey="hours_from_fly" ReadOnly="True" SortExpression="hours_from_fly" />
                                <asp:BoundField DataField="refund_rate" HeaderText="refund_rate" meta:resourcekey="refund_rate" SortExpression="refund_rate" />
                                <asp:BoundField DataField="done_user" HeaderText="done_user" meta:resourcekey="done_user" SortExpression="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" meta:resourcekey="done_time" SortExpression="done_time" />
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>

                        <asp:SqlDataSource ID="sqlRuleDetails" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" 
                            SelectCommand="bll_fare_get_refund_rule_details" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                                <asp:ControlParameter ControlID="lblRuleCode" Name="rule_code" PropertyName="Text" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <asp:Button ID="btnDelete" runat="server" meta:resourcekey="Delete" onclick="btnDelete_Click" Text="Delete" CssClass="btn btn-sm btn-default" />
                    <br />
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
                    <br />
                    <div class="well well-sm">
                        <div class="form-group">
                        <asp:Label ID="Label4" runat="server" Text="Responsibility:" meta:resourcekey="Responsibility"></asp:Label>
                        <asp:DropDownList ID="lstCancelType" runat="server">
                            <asp:ListItem meta:resourcekey="Select" Selected="True" Text="Please Select..." 
                                Value="*"></asp:ListItem>
                            <asp:ListItem meta:resourcekey="Passenger" Text="Passenger" Value="P"></asp:ListItem>
                            <asp:ListItem meta:resourcekey="Airline2" Text="Airline" Value="A"></asp:ListItem>
                            <asp:ListItem meta:resourcekey="ThirdParty" Text="Third Party" Value="T"></asp:ListItem>
                        </asp:DropDownList>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label2" runat="server" meta:resourcekey="HoursFromFly" Text="Hours From Fly: "></asp:Label>
                        <asp:Label ID="Label5" runat="server" Font-Size="X-Large" Text="-"></asp:Label>
                        <asp:TextBox ID="txthours_from_fly" runat="server" Width="40px" MaxLength="2"></asp:TextBox>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label3" runat="server" meta:resourcekey="RefundRate" Text="Refund Rate: "></asp:Label>
                        <asp:TextBox ID="txtRefundRate" runat="server" Width="40px" MaxLength="5">0.</asp:TextBox>
                        </div>
                        <asp:Button ID="btnAdd" runat="server" meta:resourcekey="Add" onclick="btnAdd_Click" Text="Add" CssClass="btn btn-sm btn-default" />
                    </div>
                </div>
            </div>
        </div>
    </div>

    </div>
    </ContentTemplate></asp:UpdatePanel>
    </form>

</asp:Content>
